#ifndef _OWMY_H_
#define _OWMY_H_

//#include "ca51f003xsfr.h"
//#include "gpiodef_f003.h"
//#include "ca51f003sfr.h"
#include "app_gpio.h"


#define ow_DQ_set()   		{ LedOn(LED2_PORT,LED2_PIN);}
#define ow_DQ_reset() 		{ LedOff(LED2_PORT,LED2_PIN); }
#define ow_DQ_get()   		{ GPIO_ReadInputDataBit(LED2_PORT,LED2_PIN);}
   
#define uchar unsigned char

typedef enum {
  READY       = 0,
  BUSY    		= 1
} OW_SLAVESTATUS;

/* Exported_Functions----------------------------------------------------------*/
void OW_Init(void);
uchar OW_ResetPresence(void);
void OW_WriteByte(unsigned char data1);
unsigned char OW_ReadByte(void);
OW_SLAVESTATUS OW_ReadStatus(void);

unsigned char OW_Read2Bits(void) ;


#endif
